home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
misc
/
unpl3951.lha
/
UnpackLibV39.51
/
Include
/
Libraries
/
Unpack.i
< prev
Wrap
Text File
|
1992-09-02
|
10KB
|
343 lines
; Unpack Library Include File
;
IFND Unpack.i
Unpack.i = 1
INCLUDE "Exec/Types.i"
BPTR MACRO
\1 EQU SOFFSET
SOFFSET SET SOFFSET+4
ENDM
; Library Name & Version
UNPACKNAME MACRO
dc.b "unpack.library",0
ENDM
UnpackVersion = 39
UnpackRevision = 51
; First The Library Offsets
AllocCInfo = -30
FreeCInfo = -36
DetermineFile = -42
Unpack = -48
TestHunk = -54
UnpackNum = -60 ;OBSOLETE!!!!
UnpackList = -66
UnpackListNext = -72
LoadFile = -78 ;V34.20
FreeFile = -84 ;V34.20
UseDrive = -90 ;V36+
UnuseDrive = -96 ;V36+
SendCmd = -102 ;V36+
NewUnpackNum = -108 ;V37+
; Library Base Structure
STRUCTURE LibraryStruct,0
STRUCT LIB_Node,14
UBYTE LIB_Flags
UBYTE LIB_Pad
UWORD LIB_NegSize
UWORD LIB_PosSize
UWORD LIB_Version
UWORD LIB_Revision
APTR LIB_IDString
ULONG LIB_Sum
UWORD LIB_OpenCnt
BPTR LIB_SegList
APTR LIB_DosBase
APTR LIB_IntBase
LABEL LibraryStruct_SIZEOF
; Unpack Numbers Structure (V37+)
STRUCTURE NumberStruct,0
UWORD NS_Version ;Library Version
UWORD NS_Revision ;Library Revision
UWORD NS_Types
UWORD NS_Unpackers
LABEL NumberStruct_SIZEOF
; Drive Structure (V36+)
STRUCTURE DriveStruct,0
APTR DRV_UnpackInfo
STRUCT DRV_IOStdReq,48
STRUCT DRV_MsgPort,34
STRUCT DRV_DevName,48
STRUCT DRV_DriveName,10
LABEL DriveStruct_SIZEOF
; Unpack Info Structure
STRUCTURE UnpackInfo,0
APTR UI_Filename
APTR UI_Path
APTR UI_Jump
APTR UI_CruncherName
APTR UI_DecrunchAdr
LONG UI_DecrunchLen
UWORD UI_ErrorNum
UWORD UI_CrunchNum
UBYTE UI_CrunchType
UBYTE UI_Flag
APTR UI_LoadNamePoi
LONG UI_CrunchLen
APTR UI_UserData ;V35+
APTR UI_TrackJump ;V36+
APTR UI_TrkErrJump ;V36+
LONG UI_Offset ;V36+
UWORD UI_Track ;V36+
APTR UI_ErrorMsg ;V37+
APTR UI_CrunchAdr ;V37+
APTR UI_LhaPattern ;V38+
BOOL8 UI_UseFilenamePointer ;V39+
; This Is Private, Do NOT Touch
UBYTE UI_Pad
LONG UI_CrunchLenTemp
LONG UI_FileHandler
LONG UI_Lock
LONG UI_OldLock
APTR UI_InfoAdr
APTR UI_UnpackPoi
ULONG UI_Temp
STRUCT UI_Data,4*4 ;V35+
STRUCT UI_LoadName,128
STRUCT UI_ExecuteString,256
STRUCT UI_OutputFile,16
LABEL UnpackInfo_SIZEOF
; The UI_Flag Have The Following Definations:
UFB_OneFile = 0 ;This Select To Decrunch One File Or
;All Files In An Archive.
UFB_Delete = 1 ;Delete Files After Scanning.
UFB_NoFree = 2 ;Free Memory After Jump (V35+)
UFB_Banner = 3 ;Give Banner (V36+)
UFB_NoLoad = 4 ;Do Not Load File (V37+)
UFB_Protect = 5 ;Change Protection Bits (V38+)
UFN_OneFile = 1<<UFB_OneFile
UFN_Delete = 1<<UFB_Delete
UFN_NoFree = 1<<UFB_NoFree
UFN_Banner = 1<<UFB_Banner
UFN_NoLoad = 1<<UFB_NoLoad
UFN_Protect = 1<<UFB_Protect
; And Now For The UI_CrunchType Flag:
CRU_Archive = 1 ;Archive (Lha, Zoo Etc.)
CRU_Data = 2 ;Data File
CRU_Object = 3 ;Object File
CRU_Object2 = 4 ;2 Segment Object File
CRU_Track = 5 ;Track File (DMS) (V36+)
CRUB_Encryp = 7 ;Encrypted File (If Bit Is Set)
; And The Error Flag:
ERR_Open = 1 ;Can't Open File
ERR_ReadWrite = 2 ;Read/Write Error
ERR_Memory = 3 ;Allocation Error (Out Of Memory)
ERR_Determine = 4 ;Can't Determine File
ERR_Password = 5 ;Illegal Password
ERR_Hunk = 6 ;Hunk Error
ERR_Extern = 7 ;Extern File Error
ERR_Currupt = 8 ;Crunched File Is Currupt (V35+)
ERR_Device = 9 ;Illegal Device (V36+)
ERR_DevOpen = 10 ;Couldn't Opn Dev. Or Create Port V36+
ERR_CRC = 11 ;CRC Checksum Error (V36+)
ERR_CheckSum = 12 ;Checksum Error (V36+)
ERR_Old = 13 ;Decruncher In Lib. Too Old (V36+)
ERR_DevErr = 14 ;Error From Device (V36+)
ERR_Protect = 15 ;Couldn't Set Protection Bits (V38+)
ERR_Output = 16 ;Output File Error (V39+)
; At Last The Cruncher Numbers:
MaxFilePack = 12
CN_Lha = 1 ;Lha
CN_LhaSFX = 2 ;LhaSFX
CN_Pak10 = 3 ;Pak 1.0
CN_Dms = 4 ;Dms
CN_GnuPack10D = 12 ;Gnu Packer 1.0 D
CN_GnuPack12D = 13 ;Gnu Packer 1.1/1.2 D
CN_GnuPack12Two = 14 ;Gnu Packer 1.1/1.2 Two Segment
CN_GnuPack10 = 15 ;Gnu Packer 1.0
CN_GnuPack12 = 16 ;Gnu Packer 1.1/1.2 One Segment
CN_PPData = 17 ;PowerPacker Data
CN_PPDataE = 18 ;PowerPacker Data/Encrypted
CN_PPLoadSeg = 19 ;PowerPacker LoadSeg
CN_PPLib = 20 ;PowerPacker Library
CN_PPLibE = 21 ;PowerPacker Library/Encrypted
CN_PPLibOv = 22 ;PowerPacker Library/Overlayed
CN_PP2x = 23 ;PowerPacker 2.x
CN_PP30 = 24 ;PowerPacker 3.0
CN_PP30E = 25 ;PowerPacker 3.0 Encrypted
CN_PP30Ov = 26 ;PowerPacker 3.0 Overlayed
CN_PP41 = 27 ;PowerPacker 4.0-4.1
CN_PP41E = 28 ;PowerPacker 4.0-4.1 Encrypted
CN_PP41Ov = 29 ;PowerPacker 4.0-4.1 Overlayed
CN_Turtle13 = 30 ;Turtle Smasher 1.3
CN_TSqueeze80 = 31 ;TurboSqueezer 8.0
CN_TSqueeze80S = 32 ;TurboSqueezer 8.0 Small
CN_TryIt101 = 33 ;TryIt 1.01
CN_Titanic11 = 34 ;Titanics Cruncher 1.1
CN_Titanic12 = 35 ;Titanics Cruncher 1.2
CN_Time22 = 36 ;Time Cruncher 1.7-2.2
CN_Tetra21 = 37 ;TetraPacker 2.1
CN_Tetra21Pro = 38 ;TetraPacker 2.1 Pro
CN_Tetra22 = 39 ;TetraPacker 2.2
CN_Tetra22Pro = 40 ;TetraPacker 2.2 Pro
CN_Tetra102 = 41 ;TetraCrunch 1.02
CN_Tetra11 = 42 ;TetraCrunch 1.1
CN_Stone299d = 43 ;Stone Cracker 2.99d
CN_Stone311 = 44 ;Stone Cracker 3.11
CN_Stone401A = 45 ;Stone Cracker 4.01 A
CN_Imploder31 = 46 ;Imploder 1.0-3.1
CN_Imploder31P = 47 ;Imploder 1.0-3.1 Protected
CN_Imploder31L = 48 ;Imploder 1.0-3.1 Library
CN_Imploder31LP = 49 ;Imploder 1.0-3.1 Library/Protected
CN_Imploder40 = 50 ;Imploder 4.0
CN_Imploder40L = 51 ;Imploder 4.0 Library
CN_BlkDec21 = 52 ;Black & Decker 2.0-2.1
CN_BytKil20 = 53 ;ByteKiller 2.0
CN_BytKil30 = 54 ;ByteKiller 3.0
CN_TNMCrun11 = 55 ;TNM Cruncher 1.1
CN_CrunMast10 = 56 ;Crunch Master 1.0
CN_CrMania14A = 57 ;Crunch Mania 1.4-1.9t A
CN_CrMania14AP = 58 ;Crunch Mania 1.4-1.8 A/P
CN_CrMania14D = 59 ;Crunch Mania 1.4-1.9t D
CN_CrMania18R = 60 ;Crunch Mania 1.4-1.9t R
CN_CrMania18RS = 61 ;Crunch Mania 1.4-1.9t R/S
CN_CrMania18RL = 62 ;Crunch Mania 1.8-1.9t R/L
CN_CrMania18RLH = 63 ;Crunch Mania 1.8-1.9t R/L/H
CN_CrMania18RH = 64 ;Crunch Mania 1.8-1.9t R/H
CN_CrMania18DH = 65 ;Crunch Mania 1.8-1.9t D/H
CN_CrMania18DHS = 66 ;Crunch Mania 1.8-1.9t D/H/S
CN_CrMania18DS = 67 ;Crunch Mania 1.8-1.9t D/S
CN_DoubAction10 = 68 ;Double Action 1.0
CN_DragPack10 = 69 ;DragPack 1.0
CN_House14 = 70 ;House 1.4 (RSI-Packer)
CN_HPC = 71 ;High Pressure Cruncher
CN_HPCU = 72 ;High Pressure Cruncher U
CN_IAM10Ice = 73 ;IAM Packer Pro 1.0 Ice
CN_IAM10IceD = 74 ;IAM Packer Pro 1.0 Ice/D
CN_IAM10Atm5 = 75 ;IAM Packer Pro 1.0 Atm5
CN_IAM10Atm5D = 76 ;IAM Packer Pro 1.0 Atm5/D
CN_ISC15P1 = 77 ;ISC 1.5 Pass 1
CN_ISC15P2 = 78 ;ISC 1.5 Pass 2
CN_ISC15P3 = 79 ;ISC 1.5 Pass 3
CN_MastCrun31A = 80 ;Master Cruncher 3.0-3.1 A
CN_MastCrun31R = 81 ;Master Cruncher 3.0-3.1 R
CN_MastCrun31D = 82 ;Master Cruncher 3.0-3.1 D
CN_MegaCrun10 = 83 ;Megacruncher 1.0
CN_MegaCrun12A = 84 ;Megacruncher 1.2 A
CN_MegaCrun12R = 85 ;Megacruncher 1.2 R
CN_Defjam36 = 86 ;Defjam 3.2-3.6
CN_Defjam36Pro = 87 ;Defjam 3.2-3.6 Pro
CN_PackIt10 = 88 ;PackIt 1.0
CN_PackIt10D = 89 ;PackIt 1.0 D
CN_Relokit10 = 90 ;Relokit 1.0
CN_Spike15 = 91 ;Spike Cruncher 1.1-1.5
CN_SuperCrun27 = 92 ;Super Cruncher 2.7
CN_Syncro46 = 93 ;Syncro Packer 4.6
CN_Syncro46K = 94 ;Syncro Packer 4.6 K
CN_Syncro46R = 95 ;Syncro Packer 4.6 R
CN_Syncro46RK = 96 ;Syncro Packer 4.6 R/K
CN_Stone400 = 97 ;Stone Cracker 4.00
CN_Stone400D = 98 ;Stone Cracker 4.00 D
CN_Stone401C = 99 ;Stone Cracker 4.01 C
CN_Stone401D = 100 ;Stone Cracker 4.01 D
CN_XpkBLZW = 101 ;XPK-BLZW
CN_XpkCBR0 = 102 ;XPK-CBR0
CN_XpkDLTA = 103 ;XPK-DLTA
CN_XpkFEAL = 104 ;XPK-FEAL
CN_XpkHUFF = 105 ;XPK-HUFF
CN_XpkIDEA = 106 ;XPK-IDEA
CN_XpkIMPL = 107 ;XPK-IMPL
CN_XpkNONE = 108 ;XPK-NONE
CN_XpkNUKE = 109 ;XPK-NUKE
CN_XpkRDCN = 110 ;XPK-RDCN
CN_XpkRLEN = 111 ;XPK-RLEN
CN_XpkSHRI = 112 ;XPK-SHRI
CN_MaxPacker12 = 113 ;MaxPacker 1.2
CN_PMC = 114 ;PMC Cruncher
CN_Stone271 = 115 ;Stone Cracker 2.6a-2.71
CN_Stone271K = 116 ;Stone Cracker 2.6a-2.71 K
CN_Stone310 = 117 ;Stone Cracker 3.10
CN_Stone402 = 118 ;Stone Cracker 4.02a
CN_Stone402A = 119 ;Stone Cracker 4.02a A
CN_Stone402D = 120 ;Stone Cracker 4.02a D
CN_Stone402L = 121 ;Stone Cracker 4.02a L
CN_Turtle200 = 122 ;Turtle Smasher 2.00
CN_Turtle200D = 123 ;Turtle Smasher 2.00 D
CN_ANC = 124 ;ANC-Cruncher
CN_DisImp10 = 125 ;Discovery File Imploder 1.0
CN_HQC20 = 126 ;HQC Cruncher 2.0
CN_XpkCRM2 = 127 ;XPK-CRM2
CN_XpkENCO = 128 ;XPK-ENCO
CN_XpkFAST = 129 ;XPK-FAST
CN_Stone292 = 130 ;Stone Cracker 2.92
CN_Stone299 = 131 ;Stone Cracker 2.99
CN_PCompress29 = 132 ;P-Compress 2.9
CN_CrMania19AP = 133 ;Crunch Mania 1.9t A/P
CN_CrMania19AH = 134 ;Crunch Mania 1.9t A/H
CN_CrMania19AHP = 135 ;Crunch Mania 1.9t A/H/P
CN_TSqueeze61 = 136 ;TurboSqueezer 6.1
CN_FlashSpeed10 = 137 ;FlashSpeed 1.0
CN_BytKilPro10 = 138 ;ByteKiller 1.0 Pro
CN_BytKilPro10K = 139 ;ByteKiller 1.0 Pro K
CN_Stone401bA = 140 ;Stone Cracker 4.01ß A
CN_TrashEli10 = 141 ;Trash Eliminator 1.0
CN_Ultimate11b = 142 ;Ultimate Packer 1.1b
CN_TFA154 = 143 ;TFA Cruncher 1.54
CN_SExec11 = 144 ;S-Exec 1.1
CN_Stone4102 = 145 ;Stone Cracker 4.10.2
CN_Stone4102A = 146 ;Stone Cracker 4.10.2 A
CN_Stone4102AP = 147 ;Stone Cracker 4.10.2 A/Plain
CN_Stone4102APr = 148 ;Stone Cracker 4.10.2 A/Pro
CN_Stone4102D = 149 ;Stone Cracker 4.10.2 D
CN_Stone4102L = 150 ;Stone Cracker 4.10.2 L
CN_DragPack252 = 151 ;DragPack 2.52
CN_DragPack252D = 152 ;DragPack 2.52 D
CN_Stone300 = 153 ;Stone Cracker 3.00
CN_Stone300D = 154 ;Stone Cracker 3.00 D
CN_Stone300K = 155 ;Stone Cracker 3.00 K
CN_XpkSQSH = 156 ;XPK-SQSH
; This Label Will Be Deleted Later On
CN_ComCra11 = CN_TNMCrun11 ;Compressor Crackings Inc. V1.1
ENDC